package com.yyrj.spring.client;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.yyrj.spring.dao.UserDao4MySqlImpl;
import com.yyrj.spring.manager.UserManager;
import com.yyrj.spring.manager.UserManagerImpl;

public class Client {

	/**
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
//		UserManager userManager = new UserManagerImpl(new UserDao4MySqlImpl());
//		userManager.save("hehe", "nothing");
		BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
		UserManager userManager = (UserManager) factory.getBean("userManager");
	
//		UserManager userManager = (UserManager) SpringUtils.getBean1("userManagerImpl");
//		
		userManager.save("null", "null");
	
	}

}
